/* *****************************************************************************
 * JFab (http://code.google.com/p/jfab)
 * Copyright (c) 2011 JFab.org
 * Admin jfab@jeffreythompson.net
 *
 * See the file "LICENSE.txt" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 * *****************************************************************************/


package org.jfab.core.io;

import org.jfab.core.collection.CommentList;

import java.io.Writer;


/**
 * Defines methods required by a basic code generator.
 */
public interface BasicCodeGenerator
{
    /** Line separator. */
    public static final String LINE_SEPARATOR = System.getProperty(
            "line.separator");

    /**
     * @return  the memberVariablePrefix
     */
    String getMemberVariablePrefix();

    /**
     * @param  memberVariablePrefix  the memberVariablePrefix to set
     */
    void setMemberVariablePrefix(String memberVariablePrefix);

    /**
     * Write a blank line.
     *
     * @param  writer  Writer.
     */
    void writeBlankLine(Writer writer);

    /**
     * @param  writer  Writer.
     */
    void writeCloseBrace(Writer writer);

    /**
     * Write a line.
     *
     * @param  writer  Writer.
     * @param  line    Line.
     */
    void writeLine(Writer writer, String line);

    /**
     * @param  writer        Writer.
     * @param  commentLines  Comment lines.
     */
    void writeMultilineJavadocComment(Writer writer, CommentList commentLines);

    /**
     * @param  writer  Writer.
     */
    void writeOpenBrace(Writer writer);

    /**
     * Write a single line comment.
     *
     * @param  writer   Writer.
     * @param  comment  Comment.
     */
    void writeSingleLineComment(Writer writer, String comment);

    /**
     * Write a single line javadoc comment.
     *
     * @param  writer   Writer.
     * @param  comment  Comment.
     */
    void writeSingleLineJavadocComment(Writer writer, String comment);
}
